body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f7f7f7;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}
.container {
  background-color: #fff;
  padding: 40px 40px 20px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 900px;
  text-align: center;
}
h2 {
  color: #333;
  margin-bottom: 25px;
  font-size: 24px;
}
canvas {
  border: 3px solid #ddd;
  background-color: #fafafa;
  display: block;
  margin: 0 auto;
  cursor: crosshair;
  border-radius: 8px;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 25px;
  gap: 15px;
}
.controls button,
.controls input {
  padding: 12px 25px;
  font-size: 16px;
  margin: 5px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.controls button:hover,
.controls input[type='range']:hover,
.controls input[type='color']:hover {
  background-color: #007bff;
  color: white;
}
.controls button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
.control-label {
  font-size: 14px;
  color: #333;
  text-align: center;
  margin-bottom: 5px;
}
.range-wrapper,
.color-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}
.range-wrapper input {
  width: 150px;
  margin-left: 15px;
}
.color-wrapper input {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  margin-left: 15px;
  cursor: pointer;
}

/* 移动端适配：无旋转 */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }
  canvas {
    width: 100%;
    height: 100%;
  }
}

/* 按钮和输入框焦点效果 */
.controls button:focus,
.controls input:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}
